]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st/entry: Notify "text" prop on every change in the ClutterText
authorJonas Dreßler <verdre@v0yd.nl>
Thu, 23 Jan 2020 18:09:50 +0000 (19:09 +0100)
committerJonas Dreßler <verdre@v0yd.nl>
Thu, 23 Jan 2020 18:16:59 +0000 (19:16 +0100)
Notifying the "text" property inside `st_entry_set_text()` misses all
the text changes done by ClutterText itself, including those that happen
on key-presses. Fix that by notifying that property inside the
"notify::text" handler connected to the ClutterText.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/951

src/st/st-entry.c

index ba3d1ca603b143b45defd363ee045d0d8b95bfa2..24fe7434c79a6216babbec49e72c236a834435a1 100644 (file)
@@ -542,6 +542,8 @@ clutter_text_changed_cb (GObject    *object,
 
   /* Since the text changed, force a regen of the shadow texture */
   cogl_clear_object (&priv->text_shadow_material);
+
+  g_object_notify_by_pspec (G_OBJECT (entry), props[PROP_TEXT]);
 }
 
 static void
@@ -1054,7 +1056,8 @@ st_entry_set_text (StEntry     *entry,
 
   clutter_text_set_text (CLUTTER_TEXT (priv->entry), text);
 
-  g_object_notify_by_pspec (G_OBJECT (entry), props[PROP_TEXT]);
+  /* Note: PROP_TEXT will get notfied from our notify::text handler connected
+   * to priv->entry. */
 }
 
 /**